<!DOCTYPE html>
<html>

	<head>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="apple-mobile-web-app-status-bar-style" content="black" />
		<meta name="format-detection" content="telephone=no" />
		<meta charset="utf-8">
		<title>{$page_title}</title>
		<link rel="stylesheet" href="__TPL__/team/css/ectouch.css" />		
	</head>

	<body>
		<div class="con cont-pb">
			<div id="loading"><img src="__TPL__/team/images/loading.gif" /></div>
			<!--{if $is_open eq 1}-->
			<header class="dis-box index-fixed-box js-item-hidden" >
				<div class="index-fixed-imgbox">
					<div class="index-header-img item01"><img src="__TPL__/team/images/header.jpg" class="img"></div>
				</div>
				<div class="box-flex onelist-hidden">
					<label><em class="col-9 item02" style="color:#fff">风**时</em><em class="item03"style="color:#fff">下单喽</em> <em class="col-9 item04">1秒前</em></label>
				</div>
			</header>
			<!--{/if}-->			
			<div class="shopping-list j-shopping-list">
				<div class="shopping-menu j-shopping-menu maxbox">
					<div class="dis-box b-color-f">
						<nav class="shopping-list-nav box-flex swiper-container-horizontal">
							<ul class="swiper-wrapper">
								<li class="div0 swiper-slide active  swiper-slide-active" category="0"><a class="product-div-link" href= "{:url('index/index')}"></a>首页</li>								
								<!--{foreach from=$team_categories item =val key=key }-->	
								<li class="div{$val.id} swiper-slide {if $key eq 0}swiper-slide-next{/if} position-rel" category="{$val.id}"><a class="product-div-link" href= "{$val.url}"></a>
									{$val.name}
								</li>
								<!--{/foreach}-->
							</ul>
						</nav>
					</div>
				</div>
			</div>
			<div class="swiper-wrapper">
				<section class="swiper-slide">
					<div class="index-box">					
						<div class="index-banner swiper-container box position-rel banner-first">
							<div class="swiper-wrapper m-45">
								{insert name='ads' id=255 num=5}
							</div>
							<!-- 分页器 -->
							<div class="swiper-pagination banner-first-pagination"></div>
						</div>

						<!--nav-->
						<nav class="b-color-f index-nav">
							<ul class="box ul-5 text-c bg-white font-03">
								<!--{foreach from=$navigator item=nav}-->
								<li class="">
									<a href="{$nav.url}" {if $nav.opennew eq 1}target="_blank" {/if} class=""><img src="{$nav.pic}" /></a>									
									<p>{$nav.name}</p>
								</li>
								<!--{/foreach}-->
							</ul>
						</nav>
						<!--index-活动-list-->
						<section class="index-activity m-top10">

							<div class="dis-box m-top1px">
								<div class="box-flex activity-list">
								{insert name='ads' id=257 num=1}
								</div>
								<div class="box-flex activity-list-1">									
									{insert name='ads' id=265 num=2}
								</div>
							</div>
						</section>
						<!--index-团购-list-->
						<div class="index-banner swiper-container box banner-second swiper-container-horizontal m-top10">
							<div class="swiper-wrapper">
								{insert name='ads' id=256 num=4}
							</div>
							<!-- 分页器 -->
							<div class="swiper-pagination br-half text-c banner-second-pagination"><span class="swiper-pagination-bullet swiper-pagination-bullet-active"></span><span class="swiper-pagination-bullet"></span></div>
						</div>
						<!---拼团-list--->
						<section>
							<!--list-1-->
							<div id="J_ItemList">
							<div class="single_item m-top10"></div>
								<a href="javascript:;" style="text-align:center" class="get_more"></a>							
							</div>							
						</section>

					</div>
				</section>
			</div>

			<!--footer-nav-->
			<footer class="footer-nav dis-box">
				<a href="{:url('index/index')}" class="box-flex nav-list active">
					<i class="nav-box i-home"></i><span>首页</span>
				</a>
				<a href="{:url('category/top_all')}" class="box-flex nav-list">
					<i class="nav-box i-cate"></i><span>分类</span>
				</a>
				<a href="{:url('category/user_ranking')}" class="box-flex nav-list">
					<i class="nav-box i-ranking"></i><span>排行</span>
				</a>
				<a href="{:url('flow/cart')}" class="box-flex position-rel nav-list">
					<i class="nav-box i-flow"></i><span>购物车</span>
					<em class="position-abo ect-num-tag"><!--{if $seller_cart_total_number }-->{$seller_cart_total_number}<!--{else}-->0<!--{/if}--></em>
				</a>
				<a href="{:url('user/index')}" class="box-flex nav-list">
					<i class="nav-box i-user"></i><span>用户中心</span>
				</a>
			</footer>
			<!--搜索-->
			<div class="search-div ts-3">
				<section class="t-search-footer active">
					<form action="{:url('category/index')}<!-- {if $id} -->&id={$id}<!-- {/if} -->" method="post">
					<div class="user-address-search dis-box j-text-all">
						<div class="box-flex">
							<div class="user-search-input position-rel">
								<i class="iconfont icon-search"></i>
								<input class="j-input-text ts-5" name="name" type="text" placeholder="请输入搜索的商品" id="newinput" autofocus="autofocus">
								<i class="iconfont icon-guanbi is-null j-is-null"></i>
							</div>
						</div>
						<div class="user-right-search">
							<div class="search-box b-color text-c"><button type="submit">搜索</button></div>
						</div>
					</div>
					</form>
				</section>
				<section class="search-con">
					<div class=" history-search ">
						<p>
							<label class="fl">热门搜索</label>
						</p>
						<ul class="hot-search a-text-more">
							
							<!-- {foreach from=$hot_search_keywords item=keyword} -->
							<li class="w-3">
								<a href="{:url('category/index', array('keywords'=>$this->_var[keyword]))}"><span class="onelist-hidden">{$keyword}</span></a>
							</li>
							<!-- {/foreach} -->
						</ul>
						<p class="hos-search">
							<label class="fl">最近搜索</label>
							<span class="fr" onclick="javascript:clearHistroy();"><i class="iconfont icon-shanchu"></i></span>
						</p>
						<!--{if $search_histroy}-->
						<ul class="hot-search a-text-more" id="search_histroy">
							
							<!-- {foreach from=$search_histroy item=keyword} -->
							<li class="w-3">
								<a href="{:url('category/index', array('keywords'=>$this->_var[keyword]))}"><span class="onelist-hidden">{$keyword}</span></a>
							</li>
							<!-- {/foreach} -->
						</ul>
						<!--{else}-->
						<div class="no-div-message">
							<p>近期没有浏览记录</p>
						</div>
						<!--{/if}-->
					</div>
					<footer class="close-search j-close-search">
						点击关闭
					</footer>
				</section>
			</div>
			<!--悬浮菜单s-->
			<div class="filter-top" id="scrollUp">
				<i class="iconfont icon-dingbu"></i>
			</div>
			<div class="footer-cont"><span><img src='__TPL__/team/images/loading1.gif'>正在加载……</span></div>
		</div>
		<!--悬浮菜单e-->
		<script type="text/javascript" src="__TPL__/team/js/jquery-2.1.4.min.js"></script>
		<script type="text/javascript" src="__TPL__/team/js/jquery.js"></script>
		<script type="text/javascript" src="__TPL__/team/js/swiper.min.js"></script>
		<script type="text/javascript" src="__TPL__/team/js/ectouch.js"></script>
		<!--下单提示轮播js-->
		<script type="text/javascript" src="__TPL__/statics/js/jquery.SuperSlide.2.1.1.js"></script>

		<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/jquery.more.js"></script>
		<script type="text/javascript" >var tpl = '__TPL__';</script>
		<script type="text/javascript">
			get_asynclist("{:url('index/ajax_goods', array('type'=>'best'))}", '__TPL__/images/loader.gif');
		</script>
		<script type="text/javascript">
			
			//首页下单提示轮播
			setInterval("virtual_order()",3000);
			virtual_order();
			function virtual_order(){
				$.post("index.php?m=default&c=index&a=virtual_order", '', function(data){
				if(data){
					if(data.err_no > 0){
						$(".js-item-hidden").hide();;
					}else{
						$('.item01 img').attr('src',data.avatar);//把src属性更改为'6.jpg';
						$('.item02').text(data.name);
						$('.item03').text('下单喽');
						$('.item04').text(data.seconds);
					}
					
					}
				}, 'json');
			}
			
			//设置cookie
			function setCookie(cname, cvalue, exdays) {
				var d = new Date();
				d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
				var expires = "expires=" + d.toUTCString();
				document.cookie = cname + "=" + cvalue + "; " + expires;
			}
			//清空搜索记录
			function clearHistroy() {
				setCookie('ECS[keywords]', '', -1);
				document.getElementById("search_histroy").style.visibility = "hidden";
			}

			$(function($) {
				var swiper = new Swiper('.index-new-list', {
					pagination: '.swiper-pagination',
					paginationClickable: true,
					direction: 'vertical',
					loop: true,
					grabCursor: true,
					autoplayDisableOnInteraction: false,
					autoplay: 4000,
					speed: 400,
					freeMode: true,
				});

				var mySwiper = new Swiper('.banner-first', {
					pagination: '.banner-first-pagination',
					loop: false,
					grabCursor: true,
					paginationClickable: true,
					autoplayDisableOnInteraction: false,
					loop: true,
					autoplay: 3000
				});
			});
			//滚动-nav
			var swiper_nav = new Swiper('.shopping-list-nav', {
				scrollbarHide: true,
				slidesPerView: 'auto',
				centeredSlides: false,
				grabCursor: true
			});
			var mySwiper = new Swiper('.banner-second', {
					pagination: '.banner-second-pagination',
					loop: false,
					grabCursor: true,
					paginationClickable: true,
					autoplayDisableOnInteraction: false,
					loop: true,
					autoplay: 2500
				});
			$('.shopping-list-nav li').on('click', function(e) {
					var category = $(this).attr('category');
					var index = $(".shopping-list-nav li").index(this);
					$(this).siblings().removeClass("active");
					$('.shopping-abs .swiper-slide a').removeClass("active");

					$(".div" + category).addClass("active");

					swiper_nav.slideTo(index, 1000, false); //切换到第一个slide，速度为1秒

					infinite.onload('where=' + category + '&type=1');
					var swiper = new Swiper('.j-g-s-p-con', {
						scrollbarHide: true,
						slidesPerView: 'auto',
						centeredSlides: false,
						grabCursor: true

					});
			})
		$(document).ready(function() {
            $(window).scroll(function() {
                if ($(document).scrollTop() >= 0<$(document).height() - $(window).height()) {
                       $(".footer-cont").html("<span><img src='__TPL__/team/images/loading1.gif'>正在加载……</span>")
                }
                if ($(document).scrollTop() >= $(document).height() - $(window).height()) {

			        $(".footer-cont").html("<span>没有更多了</span>")
			     
                }
            });
        });
		</script>
	</body>

</html>